﻿@using System.Globalization
@using System.Threading
@using EveKillboard.Core.Views
@model IEnumerable<CorporationCharacterView>
@*@if (Model.Any())
{
    <div class="topViewHeader">
        <img class="@string.Format("topViewHeaderImage {0}", Model.First() is IKillsView ? "topViewImageKills" : "topViewImageLosses")" width="64px" height="64px" src alt/>
        <img class="topViewHeaderImage" src="@string.Format("http://image.eveonline.com/Character/{0}_64.jpg", Model.First().CharacterEveId)" width="64px" height="64px" title="@string.Format("{0}", Model.First().CharacterName)" alt >    
    </div>
    <div>
        @{ var max = (decimal)Model.First().Count == 0 ? 1 : (decimal)Model.First().Count; }
        @foreach (var entry in Model){
        <div class="topViewListEntry">
            <div class="topViewListEntryLabel"><a class="evelink" href="@string.Format("{0}/{1}", Url.Action("pilot"), entry.CharacterInternalId)">@entry.CharacterName</a></div>
            <div class="backgroundbar"><div class="innerbar" style="@string.Format(CultureInfo.InvariantCulture, "width:{0:n0}%;", (decimal)entry.Count / max * 100)"></div></div>
            <div class="topViewListEntryCount">@string.Format(Thread.CurrentThread.CurrentCulture, "{0}", entry.Count)</div>
        </div>
        }
    </div>
}*@